package vip.xiaonuo.megvii.config.model;

import java.util.LinkedHashMap;
import java.util.Map;

public class ResponseCode {

    public static final Integer _200 = 200;

    public static final Integer _401 = 401;

    public static final Integer _403 = 403;

    public static final Integer _404 = 404;

    public static final Integer _500 = 500;

    private static Map<Integer,String> code_map = new LinkedHashMap<>();

    static {
        code_map.put(_200,"请求成功");
        code_map.put(_401,"digest认证失败，账号密码错误!!!");
        code_map.put(_403,"禁止访问，请检查设备的网络参数!!!");
        code_map.put(_404,"找不到请求,请联系开发者");
        code_map.put(_500,"连接失败，请检查设备的网络参数!!!");
    }

    public static String getMessage(Integer code){
        if(code_map.containsKey(code)){
            return code_map.get(code);
        }
        return "未知异常";
    }

}
